package com.wn.cloud.api;

import com.wn.cloud.common.entity.Payment;
import com.wn.cloud.common.response.DataResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

/**
 * @FileName: PaymentApi
 * @Description: payment服务接口
 * @Author: MaWenHao
 * @Created: 2020/3/14 - 19:09
 * @Version: V1.0
 * @Company: 东方微银科技（北京）有限公司
 */
@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
@RequestMapping("/payment")
public interface PaymentClient {

    @GetMapping("/{id}")
    DataResult<Payment> getOne(@PathVariable("id") long id);

    @PostMapping
    DataResult<Payment> save(@RequestBody Payment payment);

    @GetMapping("/timeout")
    DataResult getTimeout();
}
